preserve
	keep if ccode=="MEX"
	keep ccode year rer e7 e1 
	keep if year>=1994 & year<=1999
	gen temp=0
	replace temp=1 if year>=1995
	foreach var in rer e7 e1{
	bys temp: egen `var'_avg = mean(`var')
	}
	keep if year<=1995
	foreach var in rer e7 e1{
	gen temp`var' = `var'_avg * temp
	egen `var'_avg_9599 = total(temp`var')
	gen delta_`var' = (`var'_avg_9599 - `var'_avg)/`var'_avg*100
	}
	keep if year==1994
	keep delta*
	label var delta_rer "CPI-based RER"
	export excel delta_rer using "`1'/Footnote23", first(varl) replace
restore

